package au.edu.swin.bank.ejb.session.stateless;

import java.math.BigInteger;
import java.util.Collection;
import javax.ejb.Local;

/**
 *
 * @author root
 */
@Local
public interface CustomerLocal
{
    /**
     * Logs in a user.
     *
     * @param aUsername
     * @param aPassword
     * @return true if login successful, false otherwise
     */
    public boolean login(int aUsername, int aPassword);

    /**
     * Logs in a staff member.
     *
     * @param aUsername
     * @param aPassword
     *
     * @return true if login successful, false otherwise
     */
    public boolean staffLogin(int aUsername, int aPassword);

    /**
     * Gets the ID numbers of the accounts owned by a customer.
     *
     * @param custId
     *
     * @return the IDs of the customer's accounts
     */
    public Collection<BigInteger> getAccountIds(int custId);

    /**
     * Checks whether a customer with the specified ID is a staff member.
     *
     * @param custId
     *
     * @return true if the customer is a staff member, false if otherwise
     */
    public boolean isStaff(int custId);
    
    /**
     * Forces an eviction of the data in the Bean's cache.
     */
    public void forceEvict();
}
